#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jun 25 09:13:04 2018

@author: chenliheng
"""

    
# 计算 1/1 + 1/2 + 1/3 + .... 1/8 = 总和
# range(起始值, 结束值+1)
total = 1
for i in range(2,9):
    total += 1/i

print(total)